<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

use App\Http\Controllers\Api\Mobile\VideoController;
use App\Http\Controllers\Api\Mobile\NoticeController;
use App\Http\Controllers\Api\Mobile\PayController;
use App\Http\Controllers\Api\Mobile\ApiController;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

// Route::middleware('auth:api')->get('/user', function (Request $request) {
//     return $request->user();
// });


Route::post('/import/ppvod',  [VideoController::class, 'ppvodImport']);

//投诉
Route::post('/complain',  [ApiController::class, 'complain']);
//清除UA绑定
Route::get('clear-ua-bind',[ApiController::class,'clearingUaLink']);
//小程序支付服务器回调
Route::get('/minipay-notify',  [PayController::class, 'miniPayNotify']);

Route::group(['middleware' => ['base.param']], function () {
    
    //视频分类
    Route::post('/categories',  [VideoController::class, 'categories']);
    //视频标签
    Route::post('/tags',  [VideoController::class, 'tags']);
    //视频标签评价
    Route::post('/tag-to-video',  [VideoController::class, 'tagToVideo']);
    //视频
    Route::post('/videos',  [VideoController::class, 'index']);
    //用户通知
    Route::post('/notices',  [NoticeController::class, 'index']);

    //上报图片视频错误链接
    Route::post('/url-error',  [ApiController::class, 'UrlError']);
    //获取落地域名
    Route::post('/born-domain',  [ApiController::class, 'getBorn']);
    //获取视频cdn
    Route::post('/video-cdns',  [ApiController::class, 'getVideoCdns']);

    //微信支付
    Route::post('/get-pay',[PayController::class, 'getPay']);
    //查询支付结果  内付
    Route::post('/pay-result',  [PayController::class, 'queryPay']);
    
    //查询支付结果 -小程序支付
    Route::post('/minipay-result',  [PayController::class, 'miniPayQuery']);
});

